package com.kuang.constants;


import cn.hutool.setting.dialect.Props;

/**
 * @ClassName DaoConstants
 * @Description DAO数据库持久层的常量封装
 * @Author Augenestern_QXL
 * @Version 1.0
 */

public class DaoConstants {

    /**
     * src/main/java
     */
    public static String PATH_JAVA = "java/";

    /**
     * src/main/resources
     */
    public static String PATH_RESOURCES = "resources/";

    /**
     * 文件输出路径
     */
    public static  String PATH_BASE;

    /**
     * 包的路径
     */
    public static String PACKAGE_BASE;

    /**
     * PO的包名
     */
    public static String PACKAGE_PO;


    /**
     * 拼接后的PO包名路径
     */
    public static String PACKAGE_PODIR;

    static {
        Props props = new Props("application.properties");
        // 获取到 E:\Code\IDEA\Campus_JavaProduceV1.0\JavaProduce_V1.0_Demo\src\main
        PATH_BASE = props.getStr("path.base");
        // 获取到 com/kuang
        PACKAGE_BASE = props.getStr("package.base");
        // 获取到 entity/po
        PACKAGE_PO = props.getStr("package.po");
        // 拼接成 E:/Code/IDEA/Campus_JavaProduceV1.0/JavaProduce_V1.0_Demo/src/main/java/com/kuang/entity/po
        PACKAGE_PODIR = PATH_BASE.concat(PATH_JAVA).concat(PACKAGE_BASE).concat("/").concat(PACKAGE_PO).concat("/");

    }



}





























